﻿<Window x:Class="SerienNewsReader.MainWindow"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        Title="Serien News Reader" Height="550" Width="950" Name="NewsReader">
    <Grid>
        <Grid.RowDefinitions>
            <RowDefinition Height="25"/>
            <RowDefinition Height="29"/>
            <RowDefinition Height="277"/>
            <RowDefinition Height="9*" />
        </Grid.RowDefinitions>

        <!--Menu-->
        <Menu Grid.Row="0">
            <MenuItem x:Name="menuItemFilters" Header="Filters" IsEnabled="False">
                <!--<Separator/>
                <MenuItem x:Name="menuItemAll" Header="All my series" IsCheckable="True" Click="menuItemAllSeries_Click"/>-->
            </MenuItem>
            <MenuItem x:Name="menuItemExtra" Header="Extra">
                <MenuItem x:Name="menuItemOptions" Header="Options" Click="menuItemOptions_Click"/>
            </MenuItem>
        </Menu>
        <!--Search-->
        <StackPanel Orientation="Horizontal" Grid.Row="1">
            <Button x:Name="buttonBack" Margin="5,3,5,3" Click="buttonBack_Click">
                <Button.Content>
                    <Image Source="/SerienNewsReader;component/back.ico"></Image>
                </Button.Content>
            </Button>
            <TextBlock Text="Search:" Margin="5,3,5,0"/>
            <TextBox x:Name="textBoxFilter" TextChanged="textBoxFilter_TextChanged" Width="177" Margin="5,3,5,3"/>
        </StackPanel>
        <!--Series grid-->
        <DockPanel Grid.Row="2" Grid.RowSpan="2">
            <TabControl x:Name="tabControl">
                <TabItem x:Name="tabItemSerises" Header="Series">
                    <ScrollViewer HorizontalScrollBarVisibility="Auto" VerticalScrollBarVisibility="Auto">
                    <DataGrid x:Name="dataGridSerien" CanUserReorderColumns="True" AlternatingRowBackground="LightGray" 
                      AlternationCount="2" AutoGenerateColumns="False" ItemsSource="{Binding}">
                        <DataGrid.Columns>
                            <DataGridTextColumn Header="Language" Binding="{Binding Path=Language}" IsReadOnly="True"/>
                            <DataGridTextColumn Header="Title" Binding="{Binding Path=Title}" IsReadOnly="True"/>
                            <DataGridHyperlinkColumn Header="Link" Binding="{Binding Path=Link}" IsReadOnly="True" CanUserSort="False">
                                <DataGridHyperlinkColumn.ElementStyle>
                                    <Style TargetType="TextBlock">
                                        <EventSetter Event="Hyperlink.Click" Handler="OnHyperlink_Click"/>
                                    </Style>
                                </DataGridHyperlinkColumn.ElementStyle>
                            </DataGridHyperlinkColumn>
                        </DataGrid.Columns>
                    </DataGrid>
                    </ScrollViewer>
                </TabItem>
                <TabItem x:Name="tabItemTvMovies" Header="TV-Movies">
                    <DataGrid x:Name="dataGridTvMovies" CanUserReorderColumns="True" AlternatingRowBackground="LightGray" 
                      AlternationCount="2" AutoGenerateColumns="False" ItemsSource="{Binding}">
                        <DataGrid.Columns>
                            <DataGridTextColumn Header="Language" Binding="{Binding Path=Language}" IsReadOnly="True"/>
                            <DataGridTextColumn Header="Title" Binding="{Binding Path=Title}" IsReadOnly="True"/>
                            <DataGridHyperlinkColumn Header="Link" Binding="{Binding Path=Link}" IsReadOnly="True" CanUserSort="False">
                                <DataGridHyperlinkColumn.ElementStyle>
                                    <Style TargetType="TextBlock">
                                        <EventSetter Event="Hyperlink.Click" Handler="OnHyperlink_Click"/>
                                    </Style>
                                </DataGridHyperlinkColumn.ElementStyle>
                            </DataGridHyperlinkColumn>
                        </DataGrid.Columns>
                    </DataGrid>
                </TabItem>
            </TabControl>
        </DockPanel>
        <ProgressBar x:Name="progressBarDownload" Grid.Row="2" Width="90" Height="30" 
                     IsIndeterminate="True" />
    </Grid>
</Window>
